#include "bsp.h"


void LedInit(void)
{
	LedOff(1);
	LedOff(2);


}

void LedOn(uint8_t _no)
{
	if(_no == 1 )
	PORT_SetPin(O_ERR_LED,0);
	else if(_no == 2)
	PORT_SetPin(O_SYS_LED,0);
	
}
void LedOff(uint8_t _no)
	
{
	if(_no == 1 )
	PORT_SetPin(O_ERR_LED,1);
	else if(_no == 2)
	PORT_SetPin(O_SYS_LED,1);

}

void LedToggle(uint8_t _no)
{
	
	uint32_t pin;
	if(_no == 1)
		pin = O_ERR_LED;
	else if(_no == 2)
		pin = O_SYS_LED;
  else
	return ;
	
	if(PORT_GetPin(pin))
		PORT_SetPin(pin,0);
	else 
		PORT_SetPin(pin,1);
}



uint8_t IsLedOn(uint8_t _no)
 {
	  
	 uint32_t pin;
	 if(_no ==1)
	 pin = O_ERR_LED;
	 else
	 pin = O_SYS_LED;
	 
	 if(PORT_GetPin(pin))
		 return 1;
	 else 
	   return 0;	 
 }
 

